package com.lecture.springlecture.dao;

import com.lecture.java8.excel.model.Finance;
import com.lecture.java8.excel.model.FinanceResult;
import com.lecture.springlecture.entity.User;
import com.lecture.springlecture.entity.UserEntity;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface UserDao {
    public User getUserByName(String name);

    void saveUser(@Param("user") User user);

    /**
     * 获取所有用户
     * @return
     */
    List<UserEntity> getAll();
    /**
     * 根据id获取用户
     * @return
     */
    UserEntity getOne(Long id);
    /**
     * 新增用户
     * @param user
     */
    void insertUser(UserEntity user);
    /**
     * 修改用户
     * @param user
     */
    void updateUser(UserEntity user);
    /**
     * 删除用户
     * @param id
     */
    void deleteUser(Long id);


    void saveFinance(List<Finance> financeList);
    void saveFinanceResult(List<FinanceResult> financeResultList);

}
